﻿using CustomerService;
using J.Customer.Application.Command.MemberCardCommand;
using J.CustomerGet.Application.Command.CustomerListCommand;
using J.CustomerModel;
using MediatR;

namespace J.Customer.Application.CommandHandler.MemberCardCommandHandler
{
    public class MemberCardDetailCommandHandler : IRequestHandler<MemberCardDetailCommand, MemberCard>
    {
        private readonly IMemberCardService _memberCardService;
        public MemberCardDetailCommandHandler(IMemberCardService memberCardService)
        {
            _memberCardService = memberCardService;
        }
        public async Task<MemberCard> Handle(MemberCardDetailCommand request, CancellationToken cancellationToken)
        {
            return await _memberCardService.MemberDetail(request.id);
        }
    }
}
